//
//  JSearchView.m
//  HeadIndustry
//
//  Created by jun on 2017/8/24.
//  Copyright © 2017年 jun. All rights reserved.
//

#import "JSearchView.h"

@implementation JSearchView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        
        [self setupNav];
    }
    return self;
}

#pragma mark - 设置导航条
-(void)setupNav{
//    UIButton *leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
//
//    leftBtn.frame = CGRectMake(0, 0, 40, 35);
//    [leftBtn setImage:[UIImage imageNamed:@"icon_homepage_upArrow"] forState:UIControlStateNormal];
//    [leftBtn setImage:[UIImage imageNamed:@"icon_homepage_downArrow"] forState:UIControlStateSelected];
//    //先设置按钮里面的内容居中
//    leftBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
//    //设置文字居左 －>向左移35
//    [leftBtn setTitleEdgeInsets:UIEdgeInsetsMake(0, -35, 0, 0)];
//    //设置文字居左 －>向右移30
//    leftBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 30, 0, 0);
//    [leftBtn setTitle:@"武汉" forState:UIControlStateNormal];
//    leftBtn.titleLabel.font = [UIFont systemFontOfSize:12];
//    [leftBtn addTarget:self action:@selector(btn_leftBtnClick:) forControlEvents:UIControlEventTouchUpInside];
////    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftBtn];
//    [self addSubview:leftBtn];
//    
//    UIButton *MapBtn = [UIButton buttonWithType:UIButtonTypeCustom];
//    MapBtn.frame = CGRectMake(0, 0, 50, 35);
//    [MapBtn setImage:[UIImage imageNamed:@"icon_homepage_map_old"] forState:UIControlStateNormal];
//    [MapBtn addTarget:self action:@selector(mapBtnClick) forControlEvents:UIControlEventTouchUpInside];
//    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:MapBtn];
//    
//    
//    UISearchBar *searchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 0, 0)];
//    searchBar.backgroundImage = [UIImage imageNamed:@"icon_homepage_search"];
//    searchBar.placeholder = @"优衣库";
//    self.navigationItem.titleView = searchBar;
//    
//    self.selectAddressView =   [[JFSelectAddressView alloc]initWithFrame:CGRectMake(0, 0 ,SCREENWIDTH, SCREENHEIGHT )];
//    self.selectAddressView.delegate = self;
//    self.selectAddressView.addressScrollView.delegate = self;
//    self.selectAddressView.addressScrollView.changeCityDelegate = self;
//    
//    [self.view addSubview:self.selectAddressView];
//    self.selectAddressView.hidden = YES;
    
    //    JFAddressScrollView *scrollerView = [JFAddressScrollView scrollView];
    //    scrollerView.delegate  = self;
    
}

#pragma mark - 左边的按钮
-(void)btn_leftBtnClick:(UIButton *)button{
    button.selected = !button.selected;
//    self.selectAddressView.hidden =  !self.selectAddressView.hidden ;
}

@end
